package org.dreamwork.plugins.network.assistant.gui

import java.io.IOException
import java.io.OutputStream

interface IMessageLogger {
    fun setShowTime(showTime: Boolean)
    fun setShowAscii(showAscii: Boolean)
    fun setAutoReturn(autoReturn: Boolean)
    fun append(message: ByteArray?)
    fun append(message: ByteArray?, level: Int)
    fun dumpTo(out: OutputStream?)

    companion object {
        const val NORMAL = 0
        const val INFO   = 1
        const val ERROR  = 2
    }
}

interface INetworkAdapter {
    @Throws(IOException::class)
    fun write(data: ByteArray)

    @Throws(IOException::class)
    fun close()
}
